<?php

include('confdb.php');

$vistuplenie_idvistuplenie = urldecode($_POST['vistuplenie_idvistuplenie']);

$con = mysqli_connect($db_host, $db_user, $db_pass, $db_name);

if(!$con) {

die ('Ошибка подключения: '.mysqli_connect_error());

} 
$otvet=array();
$query = "SELECT * FROM sudgotov WHERE vistuplenie_idvistuplenie = '$vistuplenie_idvistuplenie'";

$result = mysqli_query($con, $query);
    $otvet['success']=mysqli_num_rows($result);
echo json_encode($otvet);

?>

